import {get,post,put,setTokens} from "../httpx";
import {SolutionApi} from "../urls";

const getById = id => get(SolutionApi.getSolutionById , {id} , true)
const add = data => put(SolutionApi.addSolution , data , false)
const getByPid =  pid => get(SolutionApi.getAllSolutionByPid , {pid} , true)
const getAll = () => get(SolutionApi.getRealAll)
const delById = id => post(SolutionApi.delById+'?id='+id)
const edit = detail => post(SolutionApi.adminEdit,detail)

export const Solution = {
  getById,add,getByPid,getAll,delById,edit
}
